package com.htfyun.eink.pw.core.manager;

import android.content.Context;

import androidx.annotation.NonNull;

import com.htfyun.eink.pw.core.IEinkManager;

public class EinkManagerInstance {

    @NonNull
    private final IEinkManager manager;

    private EinkManagerInstance() {
        manager = EinkManagerFactoryHelper.getEinkManager();
    }

    private static class SingletonInstance {
        private static final EinkManagerInstance INSTANCE = new EinkManagerInstance();
    }

    public static EinkManagerInstance getInstance() {
        return EinkManagerInstance.SingletonInstance.INSTANCE;
    }
    /////////////////////////////

    public void initManager(Context context) {
        manager.initManager(context);
    }

    public void screenRefresh(boolean afterWindowHide, int reserved) {
        manager.screenRefresh(afterWindowHide, reserved);
    }

    public void setScreenRotation(int rotation) {
        manager.setScreenRotation(rotation);
    }

    public void sendHwcCmd(int cmd, int[] param) {
        manager.sendHwcCmd(cmd, param);
    }

}
